/**
 * @file security_error.h
 * @author yonglin_zhang & hang_li
 * @brief 错误码
 * @version dev 0.1
 * @date 2023-07-21
 * 
 * @copyright Copyright (c) 2023
 * 
 */

#ifndef SECURITY_ERROR_H
#define SECURITY_ERROR_H

#define SECURITY_OK                         0x0000
#define SECURITY_UNKNOW                     0x0001
#define SECURITY_ERR_BAD_INPUT              0x0002
#define SECURITY_ERR_BUFFER_TOO_SMALL       0x0003
#define SECURITY_ERR_POINTER_NULL           0x0004
#define SECURITY_ERR_PADDING                0x0005  // 填充时错误
#define SECURITY_ERR_UNPADDING              0x0006  // 解填充时错误
#define SECURITY_ERR_MALLOC                 0x0007  // 申请内存失败
#define SECURITY_ERR_FILE_OPEN              0x0008  // 文件打开失败
#define SECURITY_ERR_FILE_CANNOT_READ       0x0009  // 对文件没有读取权限
#define SECURITY_ERR_FILE_CANNOT_WRITE      0x000a  // 对文件没有写入权限
#define SECURITY_ERR_FILE_SIZE_ERROR        0x000b  // 文件大小错误
#define SECURITY_ERR_FILE_WRITE_ERROR       0x000c  // 文件写入时错误

#define SECURITY_BASE64_INVALID_CHARACTER   0x0100

#define SECURITY_DES_ENCRYPT_ERROR          0x0200
#define SECURITY_DES_DECRYPT_ERROR          0x0201

// SECURITY_ERROR_H
#endif